/**
 * @param {number[]} nums
 * @return {number}
*/
var sumOfDigits = function(nums) {
  let min = Math.min(...nums), result = 0;
  let strArr = min.toString().split("");
  for(let i = 0; i < strArr.length; i++) {
    result += strArr[i].charCodeAt() - '0'.charCodeAt();
  }
  return (result + 1) % 2;
};
let nums = [34,23,1,24,75,33,54,8];
console.log(sumOfDigits(nums));
nums = [99,77,33,66,55];
console.log(sumOfDigits(nums));
